package com.hxxy.wyp.petsLover.common.services.base.backend.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hxxy.wyp.petsLover.common.entities.News;
import com.hxxy.wyp.petsLover.common.mapper.NewsMapper;
import com.hxxy.wyp.petsLover.common.services.base.backend.NewsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;

/**
 * @ClassName NewsServiceImpl
 * @Description TODO
 * @Author wyp
 * @Date 2023/1/14 16:25
 * @Version 1.0
 */
@Service
public class NewsServiceImpl extends ServiceImpl<NewsMapper, News> implements NewsService {
    @Resource
    private NewsMapper newsMapper;

    @Override
    public Page pageSearch(Page pageInfo, LambdaQueryWrapper<News> lambdaQueryWrapper) {
        Page page = newsMapper.selectPage(pageInfo, lambdaQueryWrapper);
        return newsMapper.selectPage(pageInfo, lambdaQueryWrapper);
    }
}
